Fixed lots of errorhandling issues. idleTimeout configurable