Fixed graph, and removed previous code.
Added database add functionality.
Merge remote-tracking branch 'origin/master'