Numerous bug fixes, and an SI model wrapper.