add some clean up work and some prep work for further development