Redesigned publishing page. Added logic before publishing to test error cases like length.