Changed model loading to read it from sefialized file