Fixed dynamically changing parameters and addressed code review comments