Documented more, and also got rid of all the System.out, and added logging into XML database file. More exception handling is also added.