More refactoring!
Merge pull request #382 from Podginator/master

more refactoring