refactored and heavily cleaned up options page controller