Constructor fix and formatting