Cleaned up thesis animation javascript