Massive cleanup, reducing compiler errors