add ls.php and minor fixes all around