added some helper functions and tests for future binding work.
added save-form-to-atm function and tests
bug fixes for save-form-to-atm