Final changes and more testing on the PI

 * added missing cleanup
 * clarified documentation in source
 * added programmable timeout