Refactoring and added tests.
Added more tests.
More realistic test case.
Enhanced the localizer algorithm.