Fixed some bugs and restored some missing stuff. Also a few autorefreshy things.