Exception declarations and removed unsued code