Improve spec and option handling.