Removed unneccessary defines. Fixed error message bug