Reformatted code, added parameters for default zem params