Added functions to load datasets.
Minor changes. Mostly for IO and console output.