Style fixes plus a notice fix.
Adjusted my fix to behave like salesforce genmap when not connected to salesforce.