added type attribute to Page and to constructor