Refactored again into a runnable class.