Cleans up code and fixes CSS issue