Various fixes

Fixes include removing unused imports, refactoring filenames and variable names and consistency fixes.