Added unit tests to show how complex types work

This resolves #47.