Removed all remains of bitwise_operations

Now pwm is working independently. Also some tests had to be rewritten.