clean up and removal of unsued code