Added lines to the map and new markers.Lines are not cleared correctly due to layer per line implementation which is wrong.Also refactored code and moved to separate .JS files