Refactor API requests, clean up output bugs

This change addresses a few issues with the previous release regarding
output formatting / correctness.  It also refactors the requests into a
cleaner layer of abstraction for future enhancements.