Introduced a layered mixin architecture for fifi

including unit tests for every class.