This is unfinished, but it is a much better architecture that should be
less error-prone and more maintainable.
Tested different case options
merge
Made fixes to the watching mechanism, which should now work properly.