Modularize profile page javascript.