Add initial encoding support #20