More refactoring based on Steven and Aidan comments