refactored tests
Merge pull request #48 from tutorgen/refactor-tests

refactored tests
Merged from master. Fixed merged conflicts from recent PRs
Fixed merged conflicts and test conflicts.