Improvements and UI layout in pdf