Move handlers into a single file. Try to use the example project for encoding.