cleaned up the code and added some css