some code cleanups

Cleanup some code. Mostly small things. Biggest change has to do with converse().
I have also added some FIXME remarks, these should be addressed in future work.