Simplified engine utils; fixed test