Cleaned stuff up and made it more efficient
Merge pull request #1 from mncat77/master

Pull request