Added error handling/display.
Removed phperror.
Other Changes.