improve footer scripts organization