First commit for margin feature
Merge pull request #1 from iddl/feature-margins

First commit for margin feature