Refactored quest work to be cleaner