refactoring code
Add command descriptions
add pattern options in preferences