remove and add some exceptions, add getUptime and fix derivedk alculation