First version with some garbage removed