[fix] passing through criteria builder instead of entity manager
[cleanup] organizing imports and formatting