Clean up code

- prefer where before let
- use guards instead of if cascading
- don't use tabs, they are like ugh