Lesson creation - backend, part 2

Added the back end library for processing lesson input. There is
currently a bug which is preventing this from working correctly, which
I suspect is a problem with the input form itself, and will confirm
with further testing.