Refactor to deal with relative import