Encapsulated loading/error logic into Loading class