minor cleanup + better documentation