add page title, add viewport specs for mobile safari
small js refactoring