split up decoder.cc into multiple files