some code refactoring with the locations

still bugs with it though, seems that lines are not working properly.
seems that I have a copy of an object where I'm expecting a reference.
cant figure out...