Change #define's for buffer sizes to sizeof's
Make plugins have no static state