Fixed crashing errors
Fixed most problems; adding min/max args