Refactored Code.
Removed Spring Configuration