Javascript class for getting and setting url parameters