Cleaning working implementation (without debug)