Added initial test cases.

NB: not all currently pass.