Minor bug fixes, typos and whatnot