Clean up styles and reorganize javascript