cleaned up and some re-org