Various clean-up suggestions

delay.h should not be used and #define should be moved the .h files