First attempt at optimization and more write-heavy db instead of read heavy like it is now.