did some cleanup, re-structuring