Some useful OOP snippets for JavaScript ninjas.