Remove margin and unused codes