Merge pull request #167 from xeregin/master

Mostly ha functionality