extract page details
remove unused process
reformat sql