Added check on malloc.
Added parse slot config.