Misc. Java stuff I've written/modified/copied/stolen