teensy nit, please do
```
if() {
//stuff
} else {
}
```
Missing brackets can cause all kinds of problems.