Add nested network function

Also fix typo in a function name
Add tests for API module