Update Maintenance.java

* Set default close operation to dispose to correctly free up resources on close.
* Cleaned up a few redundancies in the code.
* Fixed constructor so that the class can be properly invoked as a new Maintenance object.