fix syntax, fix @todo
small optimization
few fixes
fixes for Many relations
tidy and fixes