refactoring attr.js and move common.js to the /App folder