Fixed some bugs

Made state-changing methods thread-safe
Made countdown latch actually work.. herp