optimized flip animation; bugfixes and refactoring