Remove duplicate location struct by adding a new header. Pass around a structure instead of a pointer.