general refactor and code cleaning - step two