Put a vertical limit to the boxes position. Some clutter in the code (debug messages everywherethey will be cleaned later