Prototype update

Instead of relying on simple functions, helpers.js now uses prototypes
to extend native objects. This makes them easier to use.