refactored animation code + added spacebar exit loading panel