some code cleanup, testing, formatting adjustments. Played with JS a bit but did not have any success in getting form to work.