Fixed test block and cleaned up code to keep lines less than 80 characters