Move Analytics to algorithms and fix doc