Removed obsolete code.
Rearranged things.
Refactored.