Removing manual boxing and System.out
Better exception handling.