Changes to alg and routes