Added video code and fixed autocollapse glitch