move common.js functions into App namespace