improved occurrences sorting
updated todo
added graph API, parsing the whole db to return something for highcharts
completed graph API