Lots of updates to fix some stupid mistakes