Work on clean up and refactor