[BUGFIX] Tests and test fixes.

Updated the tests and introduced Unit tests for the extension.