Moving options functionality into lib/core/options