Begin coding shape context function, add tester

What I have so far has been tested, but there is a fair amount
left to be done.