Major refactor based on feedback/discussion with @jewzaam