Okay, there are a number of issues here so I'm going to do this in stages through a number of
commits. This particular commit introduces the framework for saving CSS data to the database
and fixes some bugs along the way