Moved some markup around for better reusability.