Fixed minor malufunctions and changed output formating