Commented the hell out of my code. refacted a little to make it more readable.