refactored spring context init