Refactor the initialize function and new function for setting up markers