removed mtf8 encoder class and improved readability of block writing method