websql code cleanup