Remove redundancy + turn off debug + some minor bugs