Removed plotting code
Removed call_and_plot, added that functionality to plot
Fixed IOError when no database is present
Added return values and documentation
Fixed IndexError