refactoring entityManager module - removing unnecessary arguments from functions, unnecessary checks (e.g. entityCollection is always an array, as it is const), etc.