Removed useless variables from database class and made the remaining variables private