Check for null resource instead of initializing
Remove unused methods