Nearly final version with collision bug