Add nodeunit
fix requires sub properties
Add unit tests