index for remaining bricks + fix many bugs