You have to modify the "CheckMove" function and make it so it will only check the cells in X0, Y-1; X-1, Y0; X0, Y0; X1, Y0; X1,Y1 are tested for collisions and will create the GhostPiece object that allows for movement.
For your blocked pieces question I'm not sure what exactly the algorithm would need to be, but it probably would need to be checked in that function as well.
If I remember correctly I explain the reasoning behind the "CheckMove" function as it is, and if you review it, you should be able to modify it according to what you are looking for by modifying the conditions/algorithm.