Refactor defineOptions to allow more options in future