clean up decode.c and change name of main files
k