Added brick logic and fixed some mistakes with rows and columns