Going through code and initializing all variables and fixing blocks of code that are affected