style changes to main.css, added comments and tidied up some sloppy code