Commented and cleaned. Needs a readme.