Added clear statements
Added Event logging