Odds and Sods

Fixed some random bugs and things.