Made changes to use annotation for beans instead of using xml