Minor code cleanup (sealing classes / tightening accessibility).
Hooked up JavaArgs and MaxMemory preferences. Cleaned up preference-storing code, to avoid repeating things.