Make lines span 80 chars or less
Fix spelling of a variable and add line indents
Add line idents
Add json encoding functionality to select.php