ticket:1 cleanup, tests fix