Fixed numerous memory leaks and added new option for specifying icon
Merge pull request #1 from backalor/add-icon

Fixed numerous memory leaks and added new option for specifying icon