Added resize on borders

First version of it. We'll proceed to refactor it in the next commits.