Rails4

Use nested module/class definitions instead of compact style.