1. Under config.h
#define DYNAMIC_KEYMAP_LAYER_COUNT 7
To reduce size only the following:
#define LAYER_STATE_8BIT