use getOrElse instead of fold for readability
Fix compilation errors in scalatra project