Moved some methods around to abstract them