code quality

on a separate note, bagel now runs properly with clang on linux.