Updated javascript methods to be extendable

Updated javascript methods to be extendable, this change should make the class changeable just by extending and making a new animateLayout method