Made code a lot smaller