Code cleanup and build errors resolved.