Feature/refactor relation

/to @ritch 
fix spacing