Made more efficient and stuff