Add init code for saving attempts
Add saving/restoring of answer attempts
Format code