more cleanUp and refactoring