removed unneccessary waitForLeaflet() and reformatted