refactored several methods, split up tests with multiple assertions, made stylistic improvements