Fixed defect with rows/columns being switched. Added scoring