Pin mode config corrected; minor #define fixes