Update interface and fix threading