Added window resize and fixed up everything so that resize works nicely