Tests added, ready for pull request