Almost all renames and some bug fixes.