Ignore /pages directory
Fix method printing (duplicate 'function', indentation and newline
Print PClose