Small fixes
While-loop now works; also more tests