Added Object-oriented classes and functions support.
Small bug fixes.