Updated Prototype (js optimization)