JSLint Compliance

- Removed unsued variables.
- Replaced global extend function with Object.create