Changed TOTP into a non-static class, added a bunch of tests for it