Added a few properties to the prototype for each widget and optimized pieces of the code