Cleaning code up. Hope you like rude commenting...