Refactored to better coding standards

Added comments and changed name of a mockevent