Refactor

- Move the function to gather elements data to function.php so both
screen.php and form.php can use it
- Refactored both screen or form to use this new function
- Removed all temp code and have screen fully using the new element
function.