Fixed some arraylist cast warnings
Added computeClosure in Relation.java