Improve display output
Fix joint dos implementation in C and improve memory usage