Added parent variable to top level scope so all prototype functions dont have to repetitively redeclare