Add missing closing braces; fix indentation
Clean up code
Move call to read from CSV input file