Cleaning up options code