Fixes for some issues

This merge will fix the following issues:

- Issue #6 
- Issue #3 

I have also removed redundant testing in the program.