Updated to use level as an external dep.

Required a small changed to the unit tests.