Rearrange some code to be more better.