Removed unneeded #define
Made typecast a little cleaner.