This branch is DONE - waiting for second branch to merge.
Also, added more test cases.