Extract interface numbers into enums.

Also done a couple indentation fixes.