Fixed two minor issues

- Flask does not propagate exceptions unless you tell it
- Import things that are used plz
- etc