moves the encoding script into lib
improves readme