Improved Ioc container.
- replaced try/catch by if
Some first tests for the IoC container