added base widget class that can be extended using prototypical inheritance, updated documentation