Revamp to share common js