did more testing, minor name changes and refactoring