Recator. Cleanup code.
merge