Added boundary checks and brick.png image