I think the finished check and the removal should go into the decode(....) method.