Added more test files.

Bugfixes and code cleanup.

Signed-off-by: Janusz Sobczak <janusz.sobczak@mobica.com>
Added code for extensions support.

Signed-off-by: Janusz Sobczak <janusz.sobczak@mobica.com>