Cleanup and update readme

For #21 and some code cleanup.