zop.js refactoring

Rename constructors, constants, change some vars declaration.