Removed printing in library functions; Added packet-reading loop