Re-factored for extensions

v1.0.2 re-factored for extensions
dirty logic built as extension
included wordcount extension