refactored js code layout to separate app/controller/directives
updated pang module
added updating to title and contents