fixed php code opening
removed closing php tags from library templates