Refactored to make users use one database table (as intended)