Cleaned up whitespace, changed a few if's to ternary statements. Also stored points in 'state' on the map DOM element.