Use let* and fix non declared variables
Export new functions

This is mostly for testing purposes, as I have no idea of how the
interface is going to look like.