Factories cleaned up and comments updated.