Made 'loaded' a property which simplifies the code.