Added basic collision checking.