Fix bugs, add properties and methods