refactoring
add clean option
revise command-line parsing