Remove two warnings by adding ending semicolon and removing an ending comma. Fix two crashing bugs based on assignment to variables that were never declared