Add redirect configuration param, fixes for file uploads, general code reorganization
Document possible form parameters
Add basic unit tests