ticket:3 reformat code in tests and models