Refactor ValueCell

Break up code from nasty if block into separate worker methods.
Progress on debugging models/upload from client

I still get a response code of 500: internal server error.