adding tests, coverage and linting, and fixing up errors

Signed-off-by: Kyle Rockman <kyle.rockman@mac.com>