updated codebase to resolve strange errors, Basically big reset button from previous code attempts