cleaned up JoinScan and added tests
Merge pull request #42 from timbokopter/feature/cleanup_JoinScan

cleaned up JoinScan and added tests