major update and refactor
Merge pull request #1 from qrs/master

major update & refactor