Code cleaned up. Need to figure out a nice example to include