Moved presentation logic for building data from Python-model to javascript.