Removed redundant definitions. Cleaned up parameter tuning code. Added configuration for Matrix bins