Added solid bricks and did some code refactoring.