Cleaned up load function and queue