Reworked the Ideal-Logic API. Ready for testing. Still has some todos