Formatting, cleanup, comments
Changing it to use a reverse dict too