Removed old code. Added indenting and etc.