Changed method scopes.
Fix resource path.
Merge branch '4.0'