Bugfixes And Consistency Changes

Fixed a few bugs where the intended behaviour was not occuring.
Renamed a few variables and arguments to make them more consistently
name with the rest of the application.