updated relation provider to handle all relations
removed unneeded code
updated layout