*edit: code cleanup