Reduce & simplify javascript.
Re-use code in Mapper to reduce duplication in Profiles class.