more re-factoring

Need to continue to take a look at the code and simplify the logic.
Right now it is a bit wordy.
Merge branch 'master' of https://github.com/Meowse/TheBatCave