Changes argument's verifing to contracts
Added procedure to find the farthest points
Refactoring