Restructured and simplified code.

Made Package part of PageInfo.