fixed double form submit.
add trim directory
add subdirectory management for operations