changed MethodCategory to use getter/setter methods for distance and type of relation. before_destroy still does not want to work.