Cleaning up, setting up proper output and commenting code