Merge pull request #14 from am11/master

Performance improvements and removed unnecessary string declarations.
Merge pull request #16 from am11/master

Fixed formatting issue #15