Implemented a function creating horizontal walls, minimising number of objects