Center view now working. General refactoring.