Added Unit Tests
Synced with master
Fixed error when  is array
Various fixed as per pull comments
Merge pull request #6 from SaltShipDesign/unit-tests

Added Unit Tests