fixed various server things, made saving work, fixed preview iframe