Encapsulate margin core functionalities in MarginCore