unnecessary cast, array keys are auto cast to int if valid dec int value
updated database layout to facilitate user rankings
use in-memory sql tables to calc cumulative activity, write rankings to disk
correct/improve some comments