Shell script refactoring
More shell script refactoring
Add bash completion script