Work on parameters

- exception handling
- indentation of some code