Introduced unit testing
Implemented centerPosition