Merge pull request #8 from ceekayel/master

Added tests, refactored code, tested with Split