Fixed get selected submission, added get_final_submission code.