Cleanup code and documentation, bumped to 1.0.5

Change-Id: I31ef35d4be8f2fda29daf27e26eaef82ccc51f77