Enhancement and cleanup of the code, the extension now should be easier to write and most bugs should be fixed.
Cleanup of namespace