Fixed type checking and documentation from #89.