performance and code style updates.