Changed organization of code.