Remove duplicate code in file buffer

Signed-off-by: Nico Rutishauser <nr@hotmail.ch>
Remove the demo code from library

Signed-off-by: Nico Rutishauser <nr@hotmail.ch>