refactor js views, abstract function included
.gitignore update