bufixes test, refactoring classes, saving user