Added map to dynamic model and handling of particles at the walls of the environment