Add helpers and tests