bugfix box shadow on pagination, general refactor/cleanup