Moved the getAttributes methods to common.js