optimized some stuff, not tested
merged TempFlockingBranch into optimiseGetCharacters
merged remote TempFlockingBranch into local optimiseGetCharacters