Added function to extend some prototypes and docblocked.
Refactored