Moved files from helper folder to model.