before pull
merged
split logging
minor clearing and move bool defines to common.h