cleaning up code and adding css