205 decoupling learning material crud

Fixes #205
I just turned it into multi-lines with comments so it will hopefully be less confusing to the eye and it gets it out the door... array_unique was still returning at least one null value and i wasn't sure where to put the callable function for array_filter and we need to get this out the door.