refactor to use CommonJS standard, lint files