cleaning up the markup and some other fine-tuning