Revert "Refactored Code"

This reverts commit 9c024eb3944dac50331a97e024186897afac462b.
Revert "Code Refactoring"

This reverts commit 179c4a789655c085679120d499bbfaed7549dab9.