Fixed up messy code and added in a preloader!