Various minor fixes, collisions almost done. Warning: this current version is unstable.