Optimizations

Optimized some of the code I think, defined $returnHash in the function
vars, although I think somehow doing it as some sort of global var in
the class would be better?

Removed unnecessary variables in certain functions and called the
variables from the config instead.