File handling and animation fixed