TUP-2293 : cleanup some code