Moved tests into their separate files.  Also now passing config into tasks which makes it much easier to test