Extract methods and provide options for square border.
Confine squares to their container. Make script more object-oriented.
Update README.