some implementation restructuring
Merge branch 'brent' of https://github.com/MGM-KTH/intfact into brent