added end markers, some refactoring as well
addition of info windows