Clean up some whitestpace and dead comments

Also, cache the initialization of constants in model_filter.