Updated css and refactored flag create code