Replay

till now i tried to only fix bugs and no new features. maybe you can review it now better, i made lots small commits.