Registry Pattern for JavaScript