Fix bugs, add methods, comments and examples