Refactor resize handler size and positionning