changed routing to be more extensible and added docs on logging