removed draw extras and tidied up map.js code