Some code refactoring, some bugs found, some bugs made...