misc changes to make it printable to pdf and remove unused codes.