added stats saving and prettier errors and notes