Added Router interface and improve api routing