Refactor application classes using resource container