Cleanup and typofixes