Added check for page vars
Started publish engine logic