Some improvements, fixes and whitespace amends.