Removed brute forcing

Removed negative margins.
Other small changes.