code clean up, removed old and unused code