code cleanup / unification