Fixed validations in the runtime as well, added a few tests.
Added DI.