Add some helper functions and types
Change keyword "def" to "let" to unify syntax