removed test code erroneously added to the shanchen branch
Merged bugfix from Marcello and removed some more SHANCHEN ifdefs