refactor code package and spring xml changes