Moved code out of contructor to avoid memory leak
Merge branch 'development'