CS
Hide PHP notice if debug mode is disabled
Added renderConfigFree() method

Reduces duplicate code
Added unit test for gallery config