Lots of bugfixes and detect bytecode offset mismatch