Reorganize and improve output