Large scale improvements suggested by NetBeans