cleanup decode.cpp

removed indexing template