refactoring api. register route in __init__ in place of each module to keep routes definitions into a single place