Add method getSize()
Correct various errors