removed some spaces and refactored some stuff.