Implemented centering mode.

Will need work and testing.