Minor style / best practice changes to code