Fix bugs, add deletion and resize methods.