More work on stuff, some weird infinte loop bug happening though..