un-needed code
misc changes and refactoring...