Refactoring minor things