Added component click-and-drag.
Refactored component positioning.

Moved centering logic into a single place: in the component's draw
method.