Move state check to use DataLoaderService
Code style cleanup