Remove 'db' requirement for FDB.ParseQuery
Make whole api more sane, get rid of global database variables