cleanup and refactoring, added animations