TREFF: Formatting
TREFF: Cleanup
TREFF: Fix status update query

Fixes TR-18