Added short params and neatened up some code