help/error message correction and import lib/pq
refactor long if to switch case, more error messages
minor clean up
minor changes
Merge pull request #56 from ZhengYang/master

Minor UX improvement before implementing pq