Misc changes to improve clarity of code and README.