Debugging cockpit

Changes and documentation to make it easier to debug and work with cockpit.