Cleaner implementation of centered text box