Issues resolved :

1. Unused arguments are removed.
2. Optimised the code.