Intro added, code restructured