Resource engine added + refactored