Analyzer fixes

Fixed some incorrect imports, missing "self"s and variable name issues.