Interface cleanup

Clean up the templates for displaying flags, and document the pagination unit for better understanding.