Add better debugging
Merge with master