ticket:1 code cleanup