clean up for submission

- use indentation style of surrounding code
- avoid unnecessary whitespace changes
- more comments
- add names to LICENCE file