Nodeunit tests added
Moved entities to models
Some minors corrections
Correction on Query methods object return