Refactoring of code, fixed bug in unpacking string8, added two more tests.