Added thread autostart, made everything static