Fix some deprecation warnings, Work for Eyescale/Collage#40, Thread improvements