Fixed memory crasher.
- Plugged a couple memory leaks
Merge pull request #36 from MrNoodle/master

Fixed memory crasher.
Merge commit '045b4eac3c7f897592e4aa7c2d955d8b0d546cb6'