wip and code cleanup