lib.helpers cleanups

Keep on fixing up this file