A few small changes

1. Tidy up/Consolidation of Ajax code.
2. Dead code removal (js and css).
3. Cookie save/restore logic updated to match end date/days before
method.