Fixed integration tests

A comparison between two almost equal Double values was the cause.

I also cleaned a few unused fields and train wrecks.