extracted 'resume' to allow localization
condensing code and adding comments
more cleanup, comments, etc