Modularize event rect