Working, a lot code cleaning needed