Revamp .frm, add form element, other small changes and cleanups