Removed useless variable
Refactored renderEvent function. Fixed #49