Fixed couple of compilator warning and removed unused macros.