fixing issue where addvideobutton code is called in monobook where it's not available.  Also re-formatting the code to be easier to read and adding some comments