Added html, moved functions into separate file, got a test working with unicode.