Refactored, bug resolution and re-exported.