Finished separating SQL from lookup methods.