Nicer formatting & newline removing for Java