Content loading check, some refactoring