Split up monolithic function
Fix docstrings
Bump version