Refactoring of ZPArray. Added basic mechanism for overriding functions.