improved theme options code; security fixes