Implemented profile output from db, routing