Cleaned up equation class->needs more testing