Wall calculations moved to model