Added event logging. Fixed bugs in capture mechanic