1. Fixed logic for the preceding link
2. Added support for Previous elements