Message id Reference Start value issue fixed :beetle:

- Negative value message id generation due to wrong value set for reference start is fixed.
- Added logic to clear InboundEvent data after handling acks as well
Code Cleanup :sparkles:

- Code indentation issues fixed
- comments added
-