Moving pages API to the new API model

+ Missing license headers