Fixed numbers
Changes to endpoint detection, a lot of things still need a fixing