fix code style and remove unsed codes