Clean up, add documentation, TODO ideas.