Code cleanup

removed some obsolte code