wip: start code cleanup