codereview fixes for e14c73d
codereview fixes and suggestions for 4687abf
codereview fixes for fabba03