Added configurable margins.