Code cleanup, feature expansion, and pre-honeycomb compatibility