Added .gitignore, Addresses issue#24 and added unit tests

@Jack thanks for your comment. Please review my pull request for issue#24.