fix formatting and add a clear button