removed unnecessary commented code, removed mysql functions