Improved code
Merge pull request #2 from ProgTrade/master

Improved code