Minor code improvements/simplifications