Merge pull request #1 from GRANTSWIM4/master

Merge from master.
Fixed problems and code cleanup.
Merge pull request #4 from HmmmQuestionMark/master

Fix problems.