tidy up
make code more consistent
fix typo