Indent when as deep as case
Remove useless assignments
Use nested module/class definitions instead of compact style