Replaced all deprecated APIs
Simplified the option switches