cleanup

Just some clean up stuff including:
- removing unnecessary imports (some of the imports for classes were changed to single class imports, even though i prefer it that way, but tried to avoid doing this as it would make the diff messier, but sometimes it still happened due to my IDE)
- removing unnecessary casting
- removing unnecessary logic checks
- removing unused variables
Right change, wrong reason. The first line will short circuit, it's each of the other OR statements that could throw an exception unless they also had a null check.