Changed multiple functions to operate in a more general sense.
Column information is dynamically pulled from tables.

Signed-off-by: Arthur R. Wuterich <arthurwut@gmail.com>