Unnecessary code removed. Working code documented.