minor fixes, removed some unnecessary code