One thing I need to get better at (which I am at work) is keeping each code library completely independent from each other, as much as possible. For example, my Input library will use my Rectangle (x, y, w, h) TYPE from another library, but then I can't change my Rectangle library without other libraries bugging out. (May be a bad example, but the point is valid).
Yeah! That's a pain. Its so tempting sometimes, when pushed for time, to just code a bowl of noodles. Things work but are so tangled up it takes time to de-couple libraries if you want to re-use them.