LL-1194 This is a quick fix.
LL-1194 This is a quick fix.

This seems to be working well enough, but there is a need to review the
code and remove any unneeded parts (make it cleaner and simplify).

learning-layers/BitsAndPieces,learning-layers/BitsAndPieces