Use utils class
Fixes #1658