Removes trailing whitespace and improves styling