Add support to createInstance

- Allow the creation of instances
- Added test
- Added documentation

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>