Cleaned up code, implementing animations