ticket:10 code cleanup