Simplify short
Add function for maximum location
Remove redundant scopes
Use locations for delay domain
Fix pretty printing