Small cleanups, refactor some duplicated code into a single method. No