Use log4j and remove pseudo-code