Fixed error in logic, Now I have a condition for each corner site, then the remaining border sites, then the rest of the sites. Also added 4 check methods, and cleaned up code