Start refactorting and continue clean up