Simplified some crapy JS from last commit