Serialize manyToOne relations
jslint fix
Fix more tests