Added more logic into the collision check
Wall collision implemented