code cleanup, related to #40