Added 3D crystallization code