Minor style fixes
Bug fixes