Removed dead code. Fixed a bug that caused an exception when there was only one decl