Removed debugging output and standardized to printf use over echo