fixing the program and cleaning it up
Merge pull request #1 from shadowNet/master