Add debug info and spec fixes