(#4) Correcting duplicate error, general tidy up