Refactor package structures.
Make FactorLoader mechanism work.
Add tests for FactorLoader.