Fix some issues in shell scripts
Simplify buffer handling for readings
Adjust buffer handling in views
Adjust config.php generation