LOTS of refactoring. build will be working shortly