Cleanup and commenting library