made everything work again with newest android studio (And some other fixes...)