all the specs pass, files updated, minor refactoring