Make basic prepare() function
Rename dumps() to encode(), make some fixes