Type spec/records cleanup and docs. Contexts, context tests. Bugfixes for Makefile on Mac.