Cleanup of code, tentative final release

Much cleaning up of code, and commenting of unclear areas. Deletion of
some unnecessary resources. This is the tentative final release.