Basic structure

Preparation of theories, but still long way to go.
Revert "Basic structure"

This reverts commit c09711bc194ddecbf6a8ea1632950751ec3341e6.
Revert "Revert "Basic structure""

This reverts commit 49b336ece21ac22fd4ed9f806f2a2626f1fe6d8a.