[#1] Improved implementation. Added and renamed behavior functions. Removed event record.