Added crash reporting. Minor bug-fixes.