Added validation of topic length

Also, some UTF-8 string implementation because why not.
Added documentation for the id lookup