Add scoring metric

This commit might not compile and/or run.
Sort ids by u32/u64 and add routes

Minor fixes