Added some functions for checking if click coordinates were on the grid, and returning a pointer to an upclicked socket