Refactored option handling to easily manage modules