Cleanup the mess (v2)

Now we have cleaner design that will me it easier to maintain and add features.