break encoding functions into separate module
add sprite class to public/scripts/graphics