If you, or any other readers, want a better understanding of how to handle distributions, you might start with this article from The Tax Advisor entitled "Determining the Taxability of S Corporation Distributions: Part I":
https://www.thetaxadviser.com/issues/2014/jan/nitti-jan2014.html
and this follow-up article published the next month, Part II, that deals with S corps with accumulated E&P:
https://www.thetaxadviser.com/issues/2014/feb/nitti-feb2014.html