Cleanup, few comments, fixed 2 bugs with relation

Relation was causing a seg fault on creation and we had two sets of
relationship type variables. Added a few comments. Cleaned up some
commented/obsolete code