Some small code clean up