Miscellaneous java work