Refactor: correct classes initializers, allow user specify encoding for parser