Refactor

Created a constant to hold database connection
cleaned up methods using instance variables

Signed-off-by: Martha Berner <marthaberner.mb@gmail.com>