Fix bug with full length message error
Add 'setMeta' message function
Minor refactor