I am not sure what you mean with "logically right way".

Usually taking something that works and making it harder to debug and maintain is more likely the opposite of logical

Cheers,
_