a bit of stuff in misc.sml & added rename.py