Fixed a lot of bugs and added functionality for ellipsoidal interaction.