update encoder.cpp

-general cleanup
-made a better "encoding" function, now just dependent on arrays
-planning a strings.h because I like how android handles strings