Update README.md and add hasOnly condition

Various other fixes also included here, mostly related to hasOnly.