Fixed some problems with the code not compiling, and tested the saver thread.