Added some basic collision detection