minor refactoring in utils
fix bug in .asKefirStream()