Replicated changes from library

Converted to php, created additional pages