- Made the script Object-oriented
- Made script aware of error types: E_ERROR, E_WARNING, E_NOTICE
- Minor improvements