getBoundingClientRect() seem to provide better dimensions
Removed debug code