Adding unit test for bootstrap.
Added unit test case for bootstrap.
Re factored bootstrap.
Scan port before connection in bootstrap.
Merge pull request #11 from ranjan/dev

Changes related to bootstrap.