Major bug fixes and styling