Add view template and refactoring djif class