refactor complete, basic operations tested and working
script complete. push and merge to master.
Merge pull request #1 from pstevensza/refactor

Refactor