Some small fixes

- fix some scrutinizer identified issues
- resolve #226
Switching HTMLPurifier to composer management
Merge pull request #227 from geekwright/small-fixes

Some small fixes
Merge pull request #228 from geekwright/htmlpurifier

Switching HTMLPurifier to composer management