Finished porting the previous progress. Fixed some bugs with coordinating user state.