Refactoring suggested by Nick to avoid duplication and maximise reuse. Make drawMap() an overloaded method to use in other ways.