added some error handling and hooked up to new theme options