refactor of view and extracted file management