Refactored the JobThread class

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>
More casting operators and more refactoring..

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>
More refactoring..

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>