Prime restore

http://manage.dimagi.com/default.asp?145225

@czue 
@czue @dannyroberts any thoughts?