Re organize code.