refactor : now using relations insteads of properties for storing same_as and types in backend