Added PTP compatibility

slimed the script a little which added compatibility for PTP and doesn't
change how it works on other Gazelle sites