Renamed some methods, moved some vars around