Added 'data' directory, changed relevant functions accordingly