Corrected computation, and better debug
Slightly better styles for testing