refactoring, fixing minor issues with walljump