Using Handle and Runnable classes in the template