some styling changes and cleaned up main.js code