Last bug fixes and removal of debug keys