added collision and simple layering