moved struct Location to common.h
replaced all x, y arguments with struct Location