Changed code to OOP realization. Added simple drawing.