Add design and improve routing and tests. close #7