Created JSON export for outputting to a file.
Fix for tests that referred to old loader.
Adding commander to provide option of loading into database or console.