cleans up code and adds styles