WIP clean up code