Fix some bugs, change visibility of init method and update documentation.