Moves location api to own file.