Various fixes.
Various collection refactoring.
Various updates.
Various updates.
add new functions test
Test updates.