Moved constructor to the end of the class. Fixes #39