DRY, cleaning the code and added the walls