Changed database naming convention so that loading json from it would fit javascript better. Added helper function for getting the size of assoc arrays