Added the two forms, with some error checking, quick code restructure.