Fixed att cleanup, more refactoring