Test improvements, fixes in utils impl