This works alot better. But code must still be improved. I made some notes.