Everything works correctly, most bugs squashed