Moved helpers into a separate file