Types, bug fixes, and test mode