various dirty/unpolished patches and scripts