Some minor changes regarding performance and portability.