More testing and refactoring