Added in debug function.
Moved settings around in file.