code cleanup for guides