Added file import and fixed some of the helper functions