Refactor buildConstructor
Add basic promise tests

Tests that valid promises are created via closure syntax and via
deferred.