hide internal stuff from users
run hlint and fix most warnings