Added relation create tests.
Some small fixes/improvements.