Remove trailing whitespaces
Refactoring bool primops

First batch of changes. Build fails due to Alex error.