Fixed regex input errors
Removed unwanted PHP close tags