Implementing the auto save and fixing up the keyboard handeling