Some memory warning and coding style corrected.