Fixed many bugs. Added functionality for quadratic imaginary base fields and cubic base fields.