Moved a bunch of stuff over from JavaWorkspace