Cleaned up value formatting

Streamlined prepare() and moved value formatting code to _format_value()