Clean up, standardises core functions
Documents core functions
ADDS "clint" as dependency
Correctly dealing with bytes/unicode crap