v0.4.0: some function such as size & extend moved into prototypes, some other functions added.