Fixed more logics
Improved more formats
Added more comments