Grid merge code works, will remove debug later