fix a bug in format_input where output scalars were not returned correctly. Convert all models in projections.py to use format_input.