Made BackgroundThread a parent class
Added rest of description, added all methods and most functionality.
added use statement.
added reference to middleware in middlewaretesting