Various updates

better documentation, better error handling on startup etc.