Found a function that did the exact thing getFormElements does. In order to keep compatibility, kept getFormElements, but simplified it.
Improved overflow detection. Added override for HTML in case the input
tags have size defined. Debugging code still in place.
Fixed unit test check (was incorrectly inversed).