refactoring

Started code clean-up