improved debugging, verification, many bug fixes