updated main template
renamed mainjs to appjs