Object Oriented JavaScript Snippets