remove some test code; fix bug in core;