First cut at this, need to add comments still