Small improvements to helper functions
iOS emulator 1st commit (to be replaced)