Convert Totp to a function
Return object with .now() method
Merge branch 'refactoring'