[v1.0.2] Some code cleanup